package socket;

import java.util.Arrays;

public class Test {
    public static void main(String[] args) {
        int pw = 25;
        int[] allOut ={1,2,3,4,6,25,8,9,27,56,82,666,888,1000,1200};
        System.out.println(Arrays.toString(allOut));
        //将pw从数组allOut中删除
        for(int i=0;i<allOut.length;i++){
            if(allOut[i]==pw){
                allOut[i] = allOut[allOut.length-1];
                allOut[allOut.length-1] = pw;
                break;
            }
        }
        allOut = Arrays.copyOf(allOut,allOut.length-1);
        System.out.println(Arrays.toString(allOut));
    }
}
